import { OrderStatus } from '../constants/order-status';
import { OrderType } from '../constants/order-type';
import { v4 as uuidv4 } from 'uuid';

export class OrderModel {
    id: string;
    dateCreated: number;
    status: OrderStatus;
    type: OrderType;
    dateFinished?: number;

    constructor(type: OrderType) {
        this.id = uuidv4();
        this.type = type;
        this.dateCreated = new Date().getTime();
        this.status = OrderStatus.New;
    }
}
